package org.car.world.service.impl;

import java.util.List;

import org.car.world.core.entily.UpkeepTable;
import org.car.world.core.mapper.UpkeepTableMapper;
import org.car.world.service.UpkeepService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(rollbackFor = {RuntimeException.class, Exception.class})
public class UpkeepServiceImpl implements UpkeepService {

    @Autowired
    UpkeepTableMapper upkeepTableMapper;


    @Override
    public int deleteByPrimaryKey(Integer upkeepId) {
        return upkeepTableMapper.deleteByPrimaryKey(upkeepId);
    }

    @Override
    public int insert(UpkeepTable record) {
        return upkeepTableMapper.insert(record);
    }

    @Override
    public UpkeepTable selectByPrimaryKey(Integer upkeepId) {
        return upkeepTableMapper.selectByPrimaryKey(upkeepId);
    }

    @Override
    public List<UpkeepTable> selectAll() {
        return upkeepTableMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKey(UpkeepTable record) {
        return upkeepTableMapper.updateByPrimaryKey(record);
    }

}
